// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 固资测算损益费率枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2024-09-27
 */
public enum InvestmentLossRateEnum {
    SALES(1, "Sales commissions"),
    SERVICE(2, "Service and Warranty"),
    DIRECT(3, "Direct selling expense"),
    INDIRECT(4, "Indirect selling expense"),
    ADVERTISING(5, "Advertising launch"),
    ENGINEERING(6, "Engineering"),
    PRODUCT(7, "Product liability insurance");

    private int value;

    private String name;

    InvestmentLossRateEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        InvestmentLossRateEnum[] arrObj = InvestmentLossRateEnum.values();
        for (InvestmentLossRateEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
